# 1. Disable PHP Engine (Stops execution of .php files)
<IfModule mod_php7.c>
    php_flag engine off
</IfModule>
<IfModule mod_php.c>
    php_flag engine off
</IfModule>
<IfModule mod_lsapi.c>
    php_flag engine off
</IfModule>

# 2. WHITELIST: Allow only images and PDF files
# Added 'pdf' to the allowed extensions
<FilesMatch "\.(?i:jpe?g|png|gif|pdf)$">
    Require all granted
</FilesMatch>

# 3. BLACKLIST: Deny everything else (scripts, executables, etc.)
# This ensures no scripts can be reached even if engine off fails
<FilesMatch "\.(php[0-9]?|phtml|pl|py|jsp|asp|sh|cgi|exe|bin|bat)$">
    Require all denied
</FilesMatch>

# 4. Stop directory browsing
Options -Indexes
